package yf.mall.dao;

import com.yf.dao.BaseDao;
import yf.mall.entity.PriceEntity;
import yf.mall.vo.PriceVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 代理价格Dao
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Sun Sep 29 17:42:37 CST 2019
 */
@Mapper
public interface PriceDao extends BaseDao<PriceEntity> {

    /**
     * List<PriceVo> queryListVo(PriceVo priceVo);
     * <p>
     * PriceVo getVo(Long id);
     **/

    List<PriceVo> findByGoodsId(Long goodsId);

    //找到用户某个产品的价格
    PriceEntity findByUserIdAndGoodsId(@Param("userId") Long userId, @Param("goodsId") Long goodsId);

    PriceEntity findByLevelIdAndGoodsId(@Param("levelId") Long levelId, @Param("goodsId") Long goodsId);

}
